package com.ytf.test.fifth;

/**
 * @author: YTF
 * @date: 2024/9/19 14:58
 * @version: 1.0
 * @description: 初始化
 */
public class InitialValues {
    boolean aBoolean;
    char aChar;
    byte aByte;
    short aShort;
    int anInt;
    long aLong;
    float aFloat;
    double aDouble;
    InitialValues reference;
    void printInitialValues(){
        System.out.println("Data type Initial value ");
        System.out.println("Boolean: "+aBoolean);
        System.out.println("Char: "+aChar);
        System.out.println("Byte: "+aByte);
        System.out.println("Short: "+aShort);
        System.out.println("Int: "+anInt);
        System.out.println("Long: "+aLong);
        System.out.println("Float: "+aFloat);
        System.out.println("Double: "+aDouble);
        System.out.println("reference "+reference);
    }

    public static void main(String[] args) {
        InitialValues iv = new InitialValues();
        iv.printInitialValues();
        /* You could also say:
        new InitialValues().printInitialValues();
        */
        /**
         * Output:
         * Data type Initial value
         * Boolean: false
         * Char:
         * Byte: 0
         * Short: 0
         * Int: 0
         * Long: 0
         * Float: 0.0
         * Double: 0.0
         * reference null
         *
         */
    }
}
